import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author mr.ham
 * @date 2016/11/19 15:23
 */
public class DubboServiceTest {
    public static void main(String[] args) {
        try {
            System.out.println("dubbo start..");
            ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:spring/spring-context.xml");
            context.start();
            System.out.println("dubbo start success..");
        } catch (Exception e) {
            System.out.print("启动ex:"+e);
        }
        synchronized (DubboServiceTest.class) {
            while (true) {
                try {
                    DubboServiceTest.class.wait();
                } catch (InterruptedException e) {
                    System.out.print("启动error:"+e);
                }
            }
        }
    }
}
